set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "/opt/zensim")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)

add_library(zenhelp SHARED zenhelp.cpp)
add_executable(zensim zensim.cpp)
target_link_libraries(zensim PRIVATE zenhelp)

install(TARGETS zenhelp DESTINATION lib)
install(TARGETS zensim DESTINATION bin)

set(CPACK_PACKAGE_NAME "zensim")
set(CPACK_SET_DESTDIR ON)
set(CPACK_INSTALL_PREFIX "/opt/zensim")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_RPM_PACKAGE_GROUP "zensim-dev")
set(CPACK_PACKAGE_VENDOR "zensim-dev")
set(CPACK_PACKAGE_LICENSE "Mozilla Public License 2.0")
include(CPack)
